import { Button } from "antd";
import { useEffect } from "react";
import { useParams, useNavigate } from "react-router-dom";

function Add_Update() {
  const par = useParams();
  const navigate = useNavigate();
  // const par = useLocation()
  useEffect(() => {
    console.log({ par });
  }, []);
  return (
    <div>
      Add_Update----{par.id}
      <Button
        onClick={() => {
          navigate(-1);
        }}
      >
        返回back
      </Button>
    </div>
  );
}

export default Add_Update;
